<?php 
session_start();	//开启session会话
$path=$_SERVER['PHP_SELF'];
$arr=explode('/',$path);
$root='/'.$arr[1];
if(!isset($_SESSION['admin_userid'])){
	echo "<script>location='{$root}/admin/login.php'</script>";
	exit;
}
?>